package com.hardydou.framework.mybatis;

import cn.hutool.json.JSONUtil;
import com.hardydou.common.constant.Const;
import org.apache.ibatis.type.EnumOrdinalTypeHandler;
import org.apache.ibatis.type.EnumTypeHandler;


/**
 * @author ：hardy
 * @description：类型处理器
 * @date ：Created in 2020/11/19
 * @Copyright ：Hardydou.com
 */
public class TypeHandler {
    public static void main(String[] args) {
        EnumTypeHandler h;
        EnumOrdinalTypeHandler oh;
        Enum e;
        Const.DelStatus[] es = Const.DelStatus.class.getEnumConstants();
        System.out.println(JSONUtil.toJsonStr(es));
        int ordinal=Const.DelStatus.DEL.ordinal();
        System.out.println(ordinal);
    }
}
